

void main(List<String> args) {
  
test();
 sum("老高", 20);

 print( sum("老高", 20));

 print(getData(12));

 // getUserInfor("老高", 18, 1, "北京");
    getUserInfor("老高");

    getUserInfor("老高", age:18, sex:1, address: "北京");



    upload(successCall(),errorCall());

}

void test(){
  print("123");
}

String sum (String username,int age){
  print(username+":"+age.toString());

  return age<35?"可以继续做牛马":"不好意思被淘汰";
}

getData(id){
  return id;
}

getUserInfor(String username, {int? age,int? sex ,String? address} ){
  print("$username  - $age - $sex - $address");
}

successCall(){
  print("成功了");
}

errorCall(){
  print("失败了");
}

upload(Function allSuccess,Function callError){
  bool isSuccess=false;

  if(isSuccess){
     allSuccess();
    
  }else{
    callError();
  }
}





